Skip to main content

Basic Information of the Interface

Base URLs​

  • USDT-M: https://fapi.xt.com (for USDT-margined futures)
  • Coin-M: https://dapi.xt.com (for Coin-margined futures)

Network Recommendation​

It is not recommended to access XT APIs via proxy due to high latency and poor stability.


Request Methods​

  • GET requests: Parameters should be passed in the QueryString.
  • POST requests: Parameters can be passed in the RequestBody or QueryString.
When parameters are in the QueryString​

Include the following header:

Content-Type: application/x-www-form-urlencoded
When parameters are in the RequestBody​

Include the following header:

Content-Type: application/json

API Categories​

XT API endpoints are divided into Public Interfaces and User Interfaces.

🟢 Public Interfaces​
  • No authentication required.
  • Parameters are placed in the QueryString.
  • Usually use the GET method.

Example:

curl -G "https://fapi.xt.com/future/market/v1/public/symbol/detail?symbol=btc_usdt"

or:

curl -G "https://fapi.xt.com/future/market/v1/public/symbol/detail" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "symbol=btc_usdt"
🔒 User Interfaces​
  • Require authentication via HTTP headers.
  • Along with QueryString or RequestBody parameters, the following four headers are required:
HeaderDescription
validate-appkeyUser API key
validate-timestampCurrent timestamp (in milliseconds)
validate-signatureRequest signature
Content-TypeRequest content type (application/json or application/x-www-form-urlencoded)

GET Example:

curl -G "https://fapi.xt.com/future/user/v1/compat/balance/list" \
-H "validate-appkey: $APPKEY" \
-H "validate-timestamp: $TIMESTAMP" \
-H "validate-signature: $SIGNATURE" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "queryAccountId=1234567890"

POST Example:

curl -X POST "https://fapi.xt.com/future/user/v1/user/collection/add" \
-H "validate-appkey: $APPKEY" \
-H "validate-timestamp: $TIMESTAMP" \
-H "validate-signature: $SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"symbol":"btc_usdt"}'

Endpoints that do not require signature authentication will be explicitly indicated.


Authentication References​


Rate Limits​

Rate limits apply to both USDT-M (fapi.xt.com) and Coin-M (dapi.xt.com).

  • Private endpoints (signature required) are limited per API key.
  • Public endpoints (no signature) are limited per client IP.
  • Some endpoints share one quota. When endpoints are listed as a group, the limit applies to the total number of requests sent to all endpoints in that group.
  • Each limit has a sustained rate and a burst capacity. You can send up to the burst capacity at once; after that, quota is restored at the sustained rate.
Private endpoints (per API key)​
GroupEndpointsSustained rateBurst
Batch cancel / close all/future/trade/v1/order/cancel-all
/future/trade/v1/entrust/cancel-all-plan
/future/trade/v1/entrust/cancel-all-track
/future/trade/v1/order-entrust/cancel-all
/future/user/v1/position/close-all
3 requests/s20
Cancel all TP/SL/future/trade/v1/entrust/cancel-all-profit-stop1 request/s2
Adjust leverage/future/user/v1/position/adjust-leverage5 requests/s20
Open orders and entrusts/future/trade/v1/order/list
/future/trade/v1/entrust/plan-list
/future/trade/v1/entrust/track-list
/future/trade/v1/entrust/reverse-plan-list
/future/trade/v1/order-entrust/list
20 requests/s50
Open order list (POST)/future/trade/v1/order/list-open-order20 requests/s50
TP/SL and entrust history/future/trade/v1/entrust/profit-list
/future/trade/v1/entrust/profit-list-history
/future/trade/v1/entrust/plan-list-history
/future/trade/v1/entrust/track-list-history
/future/trade/v1/entrust/reverse-plan-list-history
5 requests/s15
Order and trade history/future/trade/v1/order/list-history
/future/trade/v1/order/trade-list
/future/trade/v1/order/trade-list-all
/future/trade/v1/order/trade-history
/future/trade/v1/order/quant/list-history
/future/trade/v1/order/quant/trade-list
/future/trade/v2/order/partial-canceled-orders
5 requests/s15
Position history/future/user/v1/position/break-list
/future/user/v1/position/list-history
3 requests/s6
Account history/future/user/v1/balance/bills
/future/user/v1/balance/funding-rate-list
/future/user/v1/auto-deleverage/history
/future/user/v1/taker-over/list
5 requests/s15
All other trading and position endpointsOther /future/trade/** and /future/user/v1/position/** endpoints. GET and POST endpoints are counted separately200 requests/s200
All other account endpointsOther /future/user/** endpoints. GET and POST endpoints are counted separately200 requests/s200

Position endpoints can also be called with the /future/trade/v1/position/ prefix; the same limits apply.

Public endpoints (per IP)​
EndpointSustained rateBurst
/future/market/v1/public/q/depth10 requests/s10
/future/market/v1/public/q/funding-rate50 requests/s400
/future/market/v1/public/contract/open-interest50 requests/s400
All other /future/market/** endpoints (shared)100 requests/s200
When a limit is exceeded​
  • The request is rejected with HTTP status 429 Too Many Requests.
  • Every response from a rate-limited endpoint carries these headers:
    • X-RateLimit-Remaining: requests you can still send immediately
    • X-RateLimit-Replenish-Rate: sustained rate per second
    • X-RateLimit-Burst-Capacity: burst capacity
    • X-RateLimit-Requested-Tokens: quota consumed by one request
  • On 429, back off before retrying (for example, wait 1 s and double the wait on each consecutive 429). Do not retry immediately in a loop.
  • For bulk queries across many symbols, prefer endpoints that return all symbols in one call, or use WebSocket subscriptions instead of polling.